<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
	    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
	    <link rel="stylesheet" href="../../css/aui.css">
	    <link rel="stylesheet" href="../../css/todaybill.css">
		<link rel="stylesheet" href="../../css/pulice.css">
		<script src="../../js/api.js"></script>
		<script src="../../js/libs/zepto.min.js"></script>
		<script src="../../js/vue.min.js"></script>
		<script src="../../js/vue-resource.min.js"></script>
		<script src="../../js/aui-toast.js"></script>
		<script src="../../js/common.js" type="text/javascript" charset="utf-8"></script>
		<script>
			setToken();
            $(function () {
                $('.hm-bar').load('../../data/headerOther.html',function () {
                    $(this).find('.head-main').text('当日账单');
                    $(this).find('.hm-bar-box').css('position','static');
                    $(this).find('.head-left').on('tap',function () {
                        window.history.back();
                    })
                });
                var app = new Vue({
					el:'#box',
					data:{
                        "page":"1",
                        "pageSize":"5",
                        "timeType":"today",
						account: {}
					},
                    mounted:function () {
                        this.$nextTick(function(){
                            this.aaa();
                        })
                    },
                    methods: {
                        aaa:function () {
                            this.$http.get(SURL+"app/score/score",{params:{page:this.page,pageSize:this.pageSize,timeType:this.timeType}}).then(function (res) {
                                console.log(res.body.data);
                                if(res.body.status == 1){
                                    //  alert(1)
                                    this.account = res.body.data;
                                }else {

                                }
                            }).catch(function (req) {

                            })
                        }
                    }
				});
            })
		</script>
	    <title>当日账单</title>
	</head>
	<body>
	<div class="hm-bar"></div>
		<div id="box">

			<!--身体-->
			<div class="WD-shenti">
				<div class="total flex WD-nav">
					 <div class="zj">
						<p>总计</p>
					</div>
					<div class="red-color">
						{{account.totalScore}}
					</div>
				</div>
				<div class="WD-nav">
					<div class="WD-info flex" v-for="(v,i) in account.data">
						<div class="lmLogo flex ar">
							<p class="p1">{{v.type}}</p>
							<p class="p2">{{v.createTime}}</p>
						</div>
						<div :class="{'red-color': v.score > 0,'green-color': v.score < 0}">
							{{v.score}}
						</div>
					</div>
				</div>
				<div class="No-more-data">
					- 无更多数据  -
				</div>
			</div>
		</div>
	</body>
</html>
